package com.ll.app.api.req;

import com.ll.domain.classbase.enums.CourseTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AddCourseReqDTO {

    @NotNull(message = "title不能为null")
    @ApiModelProperty(value = "课程标题", example = "公开课程")
    private String title;

    @NotNull(message = "teacher不能为null")
    @ApiModelProperty(value = "教练名字", example = "街霸")
    private String teacher;

    @NotNull(message = "startTime不能为null")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "开始时间", example = "2021-03-02 07:27")
    private Date startTime;

    @NotNull(message = "endTime不能为null")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "结束时间", example = "2021-04-02 07:27")
    private Date endTime;

    @NotNull(message = "type不能为null")
    @ApiModelProperty(value = "类型", example = "公开训练")
    private CourseTypeEnum type;

    @NotNull(message = "maxPeople不能为null")
    @ApiModelProperty(value = "允许最大报名数", example = "10")
    private Integer maxPeople;

    @NotNull(message = "dingTalkUserId 不能为null")
    @ApiModelProperty(value = "钉钉用户id", example = "123456")
    private String dingTalkUserId;

    @ApiModelProperty(value = "是否要推送钉钉消息", example = "false")
    private Boolean isPushMsg;
}
